package cn.lanqiao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import cn.lanqiao.entity.Judge_error;
import cn.lanqiao.entity.Multi_error;
@Mapper
public interface Multi_errorMapper {
	
		
	// 根据学生id展示错题
	@Select("select * from multi_error where studentId = #{studentId}")
	public List<Multi_error> findById(Integer studentId);

	// 根据题目id删除错题
	@Delete("delete from multi_error where questionId = #{questionId}")
	public int deleteById(Integer questionId);
	
	@Insert("insert into multi_error(questionId,subject,question,answerA,answerB,answerC,answerD,analysis,rightAnswer,studentId,errorAnswer) values(#{questionId},#{subject},#{question},#{answerA},#{answerB},#{answerC},#{answerD},#{analysis},#{rightAnswer},#{studentId},#{errorAnswer})")
	public int add(Multi_error multi);
}
